﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EONFULLSIN2.Services.Device {

    /// <summary>
    /// 设备通信协议服务
    /// </summary>
    public interface IDeviceBaseServices {

        /// <summary>
        /// IP
        /// </summary>
        string IpAddress { get; }

        /// <summary>
        /// 端口
        /// </summary>
        int Port { get; }

        /// <summary>
        /// 是否连接
        /// </summary>
        bool IsConnect { get; }

        /// <summary>
        /// 连接
        /// </summary>
        /// <returns></returns>
        Task<bool> ConnectAsync();

        /// <summary>
        /// 关闭连接
        /// </summary>
        /// <returns></returns>
        Task<bool> DisConnectAsync();

    }


}
